From afdb8d0deb4850411b9774dec8e201e12ea0b73a Mon Sep 17 00:00:00 2001 From: "awilliam@xenbuild2.aw" Date: Tue, 19 Dec 2006 12:40:06 -0700 Subject: [PATCH] [IA64] don't dereference xen_start_info when running on raw hardware Check we are running under Xen before trying to dereference xen_start_info! xen_start_info is NULL on ia64 if running raw hardware. Based on patch by Jes Sorensen Signed-off-by: Alex Williamson --- linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h b/linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h index 083884c130..6485dd87f0 100644 --- a/linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h +++ b/linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h @@ -215,7 +215,8 @@ asmlinkage int xprintk(const char *fmt, ...); #endif /* CONFIG_XEN || CONFIG_VMX_GUEST */ #ifdef CONFIG_XEN_PRIVILEGED_GUEST -#define is_initial_xendomain() (xen_start_info->flags & SIF_INITDOMAIN) +#define is_initial_xendomain() \ + (is_running_on_xen() ? xen_start_info->flags & SIF_INITDOMAIN : 0) #else #define is_initial_xendomain() 0 #endif -- 2.30.2